package ru.study.thinkin.tests;

import java.util.Random;

import ru.study.thinkin.tests.MyClass.StaticChanger;

class MyClass {
	static StaticChanger stchanger = new StaticChanger();
	
	long id = new Random().nextInt(50);	
	
	public class Changer {
		long chi = new Random().nextInt(50)+100;
		MyClass getOuterClass() {
			return MyClass.this;
		}
	}
	
	public static class StaticChanger {
		long chis = new Random().nextInt(100)+1000;		
		
	}
}


public class TestNestedClass {

	public static void main(String[] args) {				
		MyClass mc =  new MyClass();	
		
		MyClass.Changer changer = mc.new Changer();
		StaticChanger st1 = new MyClass.StaticChanger();
				
		System.out.println(mc.id);
		System.out.println(changer.chi);		
		System.out.println(st1.chis);
		
		System.out.println("-=--=");		

		/*
		MyClass.Changer changer2 = mc.new Changer();
		StaticChanger st2 = mc.stchanger;
				
		System.out.println(changer2.chi);
		System.out.println(st2.chis);
		*/	
		
		
	}

}
